﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="JWBSTAPP.TbBstFastprocessEdit"
    CodeBehind="TbBstFastprocessEdit.aspx.cs" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>审核</title>
    <link href="../Styles/AddOrEditPage.css" rel="stylesheet" type="text/css" />
    <link rel="stylesheet" href="../Styles/validationEngine.jquery.css" type="text/css"
        media="screen" charset="utf-8" />
    <link href="../Scripts/Lightbox/css/cupertino/jquery-ui-1.9.2.custom.min.css" rel="stylesheet"
        type="text/css" />
    <script src="../Scripts/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine-cn.js"></script>
    <script type="text/javascript" src="../Scripts/jquery.validationEngine.js"></script>
     <script type="text/javascript" src="../Scripts/Lightbox/js/ui.core.js"></script>
    <script src="../Scripts/Lightbox/js/ui.ariaLightbox_min.js" type="text/javascript"></script>
<%--    <script type="text/javascript" src="../Scripts/Lightbox/js/ui.core.js"></script>
    <script src="../Scripts/Lightbox/js/ui.ariaLightbox.js" type="text/javascript"></script>--%>
    <script type="text/javascript" src="../Scripts/CommonADEQ3.js"></script>
    <script type="text/javascript" src="../Scripts/alert/ymPrompt.js"></script>
    <link rel="stylesheet" type="text/css" href="../Scripts/alert/skin/qq/ymPrompt.css" />
    <script type="text/javascript">

        $(function () {
            var lightbox2 = $(".seriesLightbox").ariaLightbox({
                imageArray: [],
                altText: "alt",
                descText: "title",
                useDimmer: true,
                pos: "auto",
                title: "Bildergallerie",
                closeText: "关闭",
                titleText: "事故图片",
                pictureText: "第",
                ofText: "张 共",
                endText: "张",
                em: false,
                onShow: function () {
                    $("#ui-lightbox-next").html("下一页");
                    $("#ui-lightbox-prev").html("上一页");
                }
            });
        });


        $().ready(function () {
            initEditPage("TbBstFastprocessForm", "../AjaxServer/Application/TbBstFastprocessHandler.ashx");
            document.getElementById("labA").innerHTML = document.getElementById("texFastLpna").value;
            document.getElementById("labB").innerHTML = document.getElementById("texFastLpnb").value;
            $("#txtA").val($("#texFastLpna").val());
            $("#txtB").val($("#texFastLpnb").val());
            if ($("#texFastAuditstatus").val() == "1") {
                $("#bt1").hide();
                $("#bt2").show();
                $("#tr1").hide();
                $("#tr2").show();
            } else {
                $("#bt2").hide();
                $("#bt1").show();
                $("#tr2").hide();
                $("#tr1").show();
            }
            $("#labFastAuditresult").html($("#texFastAuditresult").val())
            $("#selFastAddress").val($("#texFastAddress").val());
        });


        function PushFast() {
            var id = request("id");
            ymPrompt.confirmInfo('确定要推送当前的记录？', null, null, "推送提示", function (tp) {
                if (tp == "ok") {
                    $.ajax({
                        type: "post",
                        data: { "id": id, "action": "PushRecord", "selFastAddress": $("#selFastAddress").val() },
                        dataType: "text",
                        url: "../AjaxServer/Application/TbBstFastprocessHandler.ashx",
                        success: function (data) {
                            if (data != null && data != undefined) {
                                var result = eval('(' + data + ')');
                                if (result.ISSucceed) {
                                    window.parent.pageClick();
                                    window.parent.tb_remove();
                                }
                            }

                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {

                        }
                    });
                } else {
                    return false;
                }
            });
        }


        function CallPolice() {
            var id = request("id");
            ymPrompt.confirmInfo('无法在线处理事故，确认出警？', null, null, "出警提示", function (tp) {
                if (tp == "ok") {
                    $.ajax({
                        type: "post",
                        data: { "id": id, "action": "CallPolice" },
                        dataType: "text",
                        url: "../AjaxServer/Application/TbBstFastprocessHandler.ashx",
                        success: function (data) {
                            if (data != null && data != undefined) {
                                var result = eval('(' + data + ')');
                                if (result.ISSucceed) {
                                    window.parent.pageClick();
                                    window.parent.tb_remove();
                                }
                            }

                        },
                        error: function (XMLHttpRequest, textStatus, errorThrown) {

                        }
                    });
                } else {
                    return false;
                }
            });
        }
    </script>
    <style type="text/css">
        #ui-lightbox-wrapper
        {
            display: none;
            position: absolute;
            width: 20em;
            height: auto;
        }
        #ui-lightbox-image
        {
            height: 10em;
            margin: 1em 0 0 0;
            background: url(../Scripts/Lightbox/css/ajax-loader.gif) no-repeat center center;
        }
        #ui-lightbox-image img
        {
            display: none;
        }
        
        /* Picture Styles
----------------------------------*/
        .ui-widget-content
        {
            padding: 0 1em 1em 1em;
        }
        .ui-dialog
        {
            padding: 0 1em 0 1em;
        }
        .box
        {
            padding: 0 1em 1em 1em;
            margin: 0 0 1em 0;
        }
        a.singleLightbox
        {
            margin: 0 0.8em 0 0;
        }
        ul
        {
            margin: 0;
            padding: 0;
        }
        ul li
        {
            float: left;
            margin: 0 0.9em 0 0;
            list-style-type: none;
        }
        ul li.last, a.last
        {
            margin: 0;
        }
        #texFastAddress
        {
            width: 215px;
        }
        #bmap
        {
            width: 680px;
            height: 460px;
            border: 2px solid #FFC450;
            margin: 10px auto;
        }
    </style>
</head>
<body>
    <div class="container">
        <form id="TbBstFastprocessForm" runat="server">
        <table class="mainTable">
            <tr>
                <td class="mainTable_TitleTd" colspan="4">
                    事故审核
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texFastLsh">
                        事故流水号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastLsh" name="texFastLsh" class="validate[required]" type="text" size="30"
                        value="" disabled="disabled" />
                </td>
                <td class="mainTable_LeftTd">
                    <label for="texFastUptime">
                        事故上传时间：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastUptime" name="texFastUptime" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texFastLpna">
                        报案人车牌号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <%-- <asp:TextBox ID="texFastLpna" runat="server" name="texFastLpna" class="validate[required]"
                        type="text" size="30" value="" ></asp:TextBox>--%>
                    <input id="texFastLpna" name="texFastLpna" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
                <td class="mainTable_LeftTd">
                    <label for="texFastLpnb">
                        事故相关车牌号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <%--   <asp:TextBox ID="texFastLpnb" runat="server" name="texFastLpnb" class="validate[required]"
                        type="text" size="30" value="" ReadOnly="True"></asp:TextBox>--%>
                    <input id="texFastLpnb" name="texFastLpnb" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texFastPhonea">
                        报案人手机号：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastPhonea" name="texFastPhonea" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
                <td class="mainTable_LeftTd">
                    <label for="texFastPhoneb">
                        事故相关人手机：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastPhoneb" name="texFastPhoneb" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texFastGpsJd">
                        事故发生地经度：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastGpsJd" name="texFastGpsJd" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
                <td class="mainTable_LeftTd">
                    <label for="texFastGpsWd">
                        事故发生地纬度：</label>
                </td>
                <td class="mainTable_RightTd">
                    <input id="texFastGpsWd" name="texFastGpsWd" class="validate[required]" type="text"
                        size="30" value="" disabled="disabled" />
                </td>
            </tr>
            <tr>
                <td colspan="4">
                    <input class="button" type="button" value="查看地图" id="btnMap" onclick="OpenMap()" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    <label for="texFastAddress">
                        事故发生区域：</label>
                </td>
                <td class="mainTable_RightTd">
                    <select id="selFastAddress" runat="server" name="selFastAddress" style="height: 22px;
                        width: 213px">
                    </select>
                    <input id="texFastAddress" name="texFastAddress" type="hidden" />
                </td>
                <td class="mainTable_LeftTd">
                    <input class="button" type="button" value="移交" id="Submit1" onclick="PushFast()" />
                </td>
                <td class="mainTable_RightTd">
                </td>
            </tr>
            <tr>
                <td class="mainTable_LeftTd">
                    事故图片：
                </td>
                <td class="mainTable_RightTd" colspan="3">
                    <div id="wrapper">
                        <div class="ui-corner-all ui-helper-clearfix">
                            <ul>
                                <%=imgliststr %>
                            </ul>
                        </div>
                    </div>
                </td>
            </tr>
            <%-- <tr>
                <td class="mainTable_LeftTd">
                    录音文件：
                </td>
                <td class="mainTable_RightTd" colspan="3">
                    <object width="200px" height="18px" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
                        codebase="http://www.apple.com/qtactivex/qtplugin.cab">
                        <param name="src" value="<%=sountpath %>" />
                        <param name="type" value="video/quicktime" />
                        <param name="autoplay" value="false" />
                        <param name="controller" value="true" />
                        <param name="target" value="myself" />
                        <param name="bgcolor" value="black" />
                        <param name="pluginspage" value="http://www.apple.com/quicktime/download/index.html" />
                        <embed src="<%=sountpath %>" width="200px" height="18px" controller="true" align="middle"
                            bgcolor="white" target="myself" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/index.html"></embed>
                    </object>
                </td>
            </tr>--%>
            <tr id="tr1">
                <td class="mainTable_LeftTd">
                    事故审核结果：
                </td>
                <td class="mainTable_RightTd" colspan="1">
                    <span>事故责任方:</span>&nbsp;<label id="labA" name="labA">
                    </label>
                    <br />
                    责任为：
                    <br />
                    <select id="selZR1" name="selZR1" style="width: 152px" class="validate[required]"
                        onchange="zr1()">
                        <option value="">==请选择责任分类==</option>
                        <option value="1">全部责任</option>
                        <option value="0.5">同等责任</option>
                        <option value="0">无责任</option>
                    </select>
                    <em>*</em>
                    <input id="txtA" name="txtA" type="hidden" />
                </td>
                <td class="mainTable_LeftTd">
                    &nbsp;
                </td>
                <td class="mainTable_RightTd" colspan="1">
                    <span>事故责任方：</span>&nbsp;
                    <label id="labB" name="labB">
                    </label>
                    <br />
                    责任为：
                    <br />
                    <select id="selZR2" name="selZR2" style="width: 152px" class="validate[required]"
                        onchange="zr2()">
                        <option value="">==请选择责任分类==</option>
                        <option value="1">全部责任</option>
                        <option value="0.5">同等责任</option>
                        <option value="0">无责任</option>
                    </select>
                    <em>*</em>
                    <input id="txtB" name="txtB" type="hidden" />
                </td>
            </tr>
            <tr id="tr2" style="display: none;">
                <td class="mainTable_LeftTd">
                    事故审核结果：
                </td>
                <td class="mainTable_RightTd" colspan="3">
                    <label id="labFastAuditresult">
                    </label>
                    <input id="texFastAuditresult" name="texFastAuditresult" type="hidden" />
                </td>
            </tr>
            <tr>
                <td class="mainTable_ButtonTd" colspan="4">
                    <input class="button" type="submit" value="审核" id="bt1" />&nbsp;&nbsp;&nbsp;
                    <input class="button" type="button" value="出警" id="Submit2" onclick="CallPolice()" />&nbsp;&nbsp;&nbsp;
                    <input class="button" type="button" value="取消" onclick="window.parent.tb_remove();" />
                    <input id="texFastAuditstatus" name="texFastAuditstatus" type="hidden" />
                </td>
            </tr>
        </table>
        <script type="text/javascript">
            var zr1val = $("#selZR1");
            var zr2val = $("#selZR2");
            function zr1() {
                if (zr1val.val() != "") {
                    zr2val.attr("value", 1 - zr1val.val());
                } else { zr2val.attr("value", ""); }
            }
            function zr2() {
                if (zr2val.val() != "") {
                    zr1val.attr("value", 1 - zr1val.val());
                } else { zr1val.attr("value", ""); }
            }
           
        </script>
        </form>
    </div>
</body>
</html>
<script type="text/javascript">
    function OpenMap() {
        var mapurl = "map.htm?xx=" + document.getElementById("texFastGpsJd").value + "&yy=" + document.getElementById("texFastGpsWd").value;
        window.open(mapurl, 'newwindow', 'height=460,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
    }
</script>